def insert_sort_emp(l):
    for i in range(1,len(l)):
        current = l[i]
        pre_index = i - 1
        while pre_index >= 0 and current < l[pre_index]:
            l[pre_index+1] = l[pre_index]
            pre_index -= 1

        l[pre_index+1] = current
    return l


if __name__ == '__main__':
    l = list(range(1,6))
    l.sort(reverse=True)
    l1 = [1,3,4,5,2,7,6]
    print(l)
    print(insert_sort_emp(l))
    print(insert_sort_emp(l1))